<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
       body.night{
            background-color: black;
            color: white;
            transition: all 1s;
        }
        body{
            background-color: white;
            color: black;
            transition: all 1s;
        }
    </style>
</head>
<body>
<button id="modeBtn">sun</button>
<p>hhhhh</p>
<script src="dayAndNightSwitch.js"></script>
</body>
</html>